
from django.contrib import admin
from django.urls import path, include, re_path

from cart.views import CartView
from user.views import FileView
"""购物车路由配置"""
urlpatterns = [
    #添加商品
    path('goods/',CartView.as_view({
        'post':'create',
        'get':'list'
    })),
    #修改商品选中路由
    path('goods/<int:pk>/checked/',CartView.as_view({
            'put':'update_goods_status'
    })),
    #修改商品数量
    path('goods/<int:pk>/number/', CartView.as_view({
        'put': 'updata_goods_number'
    })),
    #删除购物车商品
    path('goods/<int:pk>/', CartView.as_view({
        'delete': 'destroy'
    })),
]
